package cn.gz3c.uitest.viewmodel;

import android.content.Context;

import com.huawei.hms.audioeditor.ui.R.drawable;
import com.huawei.hms.audioeditor.ui.R.string;

import java.util.ArrayList;
import java.util.List;

import cn.gz3c.uitest.bean.MenuItemBean;


public class MenuHelper {
    private List<MenuItemBean> a;
    private List<MenuItemBean> b;
    private List<MenuItemBean> c;
    private List<MenuItemBean> d;
    private final Context context;
    public boolean f;

    public MenuHelper(Context var1) {
        this.context = var1;
        this.f = com.huawei.hms.audioeditor.ui.common.utils.f.a().a(this.context);
    }

    public List<MenuItemBean> getListMenuItemBean(MenuType var1) {
        int var2;
        List var3;
        List var4;
        int var5;
        List var6;
        String var7;
        List var8;
        List var9;
        String var10;
        String var11;
        MenuHelper var10000;
        List var10001;
        List var10002;
        List var10003;
        String var10004;
        String var10005;
        String var10008;
        switch(var1.ordinal()) {
        case 0:
            if ((var4 = this.a) != null && !var4.isEmpty()) {
                var3 = this.a;
            } else {
                this.a = new ArrayList();
                var10001 = this.a;
                var10004 = this.context.getResources().getString(string.add_audio);
                var5 = drawable.icon_main_menu_music;
                var10001.add(new com.huawei.hms.audioeditor.ui.bean.c(100, var10004, "", var5));
                if (this.f) {
                    var6 = this.a;
                    var7 = this.context.getResources().getString(string.add_sound_effects);
                    var5 = drawable.add_sound_effects;
                    var6.add(new com.huawei.hms.audioeditor.ui.bean.c(108, var7, "", var5));
                }

                var9 = this.a;
                var10008 = this.context.getResources().getString(string.add_piece);
                var5 = drawable.icon_piece;
                var9.add(new com.huawei.hms.audioeditor.ui.bean.c(110, var10008, "", var5));
                var8 = this.a;
                var11 = this.context.getResources().getString(string.recording);
                var5 = drawable.icon_main_menu_recorder;
                var8.add(new com.huawei.hms.audioeditor.ui.bean.c(101, var11, "", var5));
                var10003 = this.a;
                var10 = this.context.getResources().getString(string.volume);
                var5 = drawable.icon_volume;
                var10003.add(new com.huawei.hms.audioeditor.ui.bean.c(102, var10, "", var5));
                var10002 = this.a;
                var10005 = this.context.getResources().getString(string._style);
                var5 = drawable.icon_music_style;
                var10002.add(new com.huawei.hms.audioeditor.ui.bean.c(103, var10005, "", var5));
                var10001 = this.a;
                var10004 = this.context.getResources().getString(string.sound_field);
                var5 = drawable.icon_sound_filed;
                var10001.add(new com.huawei.hms.audioeditor.ui.bean.c(104, var10004, "", var5));
                if (this.f) {
                    var6 = this.a;
                    var7 = this.context.getResources().getString(string.text_to_speech);
                    var5 = drawable.text_to_speech;
                    var6.add(new com.huawei.hms.audioeditor.ui.bean.c(109, var7, "", var5));
                }

                var3 = this.a;
            }

            return var3;
        case 1:
            if ((var4 = this.b) != null && !var4.isEmpty()) {
                var3 = this.b;
            } else {
                this.b = new ArrayList();
                List var10007 = this.b;
                String var10010 = this.context.getResources().getString(string._splits);
                var5 = drawable.icon_free_style;
                var10007.add(new com.huawei.hms.audioeditor.ui.bean.c(203, var10010, "", var5));
                List var10006 = this.b;
                String var10009 = this.context.getResources().getString(string._delete);
                var5 = drawable.icon_delete;
                var10006.add(new com.huawei.hms.audioeditor.ui.bean.c(204, var10009, "", var5));
                var9 = this.b;
                var10008 = this.context.getResources().getString(string.volume);
                var5 = drawable.icon_volume;
                var9.add(new com.huawei.hms.audioeditor.ui.bean.c(205, var10008, "", var5));
                var8 = this.b;
                var11 = this.context.getResources().getString(string.sonic_pitch);
                var5 = drawable.icon_audio_volume_speed;
                var8.add(new com.huawei.hms.audioeditor.ui.bean.c(206, var11, "", var5));
                var10003 = this.b;
                var10 = this.context.getResources().getString(string._style);
                var5 = drawable.icon_music_style;
                var10003.add(new com.huawei.hms.audioeditor.ui.bean.c(207, var10, "", var5));
                var10002 = this.b;
                var10005 = this.context.getResources().getString(string.menu_environment);
                var5 = drawable.enviroment;
                var10002.add(new com.huawei.hms.audioeditor.ui.bean.c(217, var10005, "", var5));
                var10001 = this.b;
                var10004 = this.context.getResources().getString(string.spatial_orientation);
                var5 = drawable.spatial_orientation;
                var10001.add(new com.huawei.hms.audioeditor.ui.bean.c(216, var10004, "", var5));
                if (this.f) {
                    var10001 = this.b;
                    var10004 = this.context.getResources().getString(string.accompaniment_separation);
                    var5 = drawable.ic_sound_separation;
                    var10001.add(new com.huawei.hms.audioeditor.ui.bean.c(219, var10004, "", var5));
                    var6 = this.b;
                    var7 = this.context.getResources().getString(string.menu_segregated);
                    var5 = drawable.menu_segregated;
                    var6.add(new com.huawei.hms.audioeditor.ui.bean.c(218, var7, "", var5));
                }

                var10000 = this;
                var9 = this.b;
                var10008 = this.context.getResources().getString(string.sound_field);
                var5 = drawable.icon_sound_filed;
                var9.add(new com.huawei.hms.audioeditor.ui.bean.c(208, var10008, "", var5));
                var8 = this.b;
                var11 = this.context.getResources().getString(string.equilibrium);
                var5 = drawable.icon_balance;
                var8.add(new com.huawei.hms.audioeditor.ui.bean.c(210, var11, "", var5));
                var10003 = this.b;
                var10 = this.context.getResources().getString(string.fade_in_and_out);
                var5 = drawable.icon_fade_in_out;
                var10003.add(new com.huawei.hms.audioeditor.ui.bean.c(211, var10, "", var5));
                var10002 = this.b;
                var10005 = this.context.getResources().getString(string._duplicating);
                var5 = drawable.icon_copy;
                var10002.add(new com.huawei.hms.audioeditor.ui.bean.c(213, var10005, "", var5));
                var10001 = this.b;
                var10004 = this.context.getResources().getString(string.change_of_voice);
                var2 = drawable.icon_change_voice;
                var10001.add(new com.huawei.hms.audioeditor.ui.bean.c(214, var10004, "", var2));
                var3 = var10000.b;
            }

            return var3;
        case 2:
            if ((var4 = this.c) != null && !var4.isEmpty()) {
                var3 = this.c;
            } else {
                var10000 = this;
                this.c = new ArrayList();
                var10002 = this.c;
                var10005 = this.context.getResources().getString(string.sp_edits);
                var5 = drawable.icon_bianji;
                var10002.add(new com.huawei.hms.audioeditor.ui.bean.c(301, var10005, "", var5));
                var10001 = this.c;
                var10004 = this.context.getResources().getString(string._delete);
                var2 = drawable.icon_delete;
                var10001.add(new com.huawei.hms.audioeditor.ui.bean.c(302, var10004, "", var2));
                var3 = var10000.c;
            }

            return var3;
        case 3:
            if ((var4 = this.d) != null && !var4.isEmpty()) {
                var3 = this.d;
            } else {
                var10000 = this;
                this.d = new ArrayList();
                var10001 = this.d;
                var10004 = this.context.getResources().getString(string._delete);
                var2 = drawable.icon_delete;
                var10001.add(new com.huawei.hms.audioeditor.ui.bean.c(302, var10004, "", var2));
                var3 = var10000.d;
            }

            return var3;
        default:
            return new ArrayList();
        }
    }

    public void a() {
        List var1;
        if ((var1 = this.a) != null) {
            var1.clear();
        }

        if ((var1 = this.b) != null) {
            var1.clear();
        }

        if ((var1 = this.c) != null) {
            var1.clear();
        }

        List var2;
        if ((var2 = this.d) != null) {
            var2.clear();
        }

    }

    public enum MenuType {
        a,
        b,
        c,
        d;

        private MenuType() {
        }
    }
}
